package com.aabte.design2.behavioral.command;

import java.util.Stack;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/5/3
 */
public class CommandHistory {
    private Stack<AbstractCommand> history = new Stack<>();

    /**
     * 后进
     */
    public void push(AbstractCommand command) {
        history.push(command);
    }

    /**
     * 先出
     */
    public AbstractCommand pop() {
        return history.pop();
    }

}
